<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>task</title>
  <#include "/include/layui-top.html">
  <style>
  /* 以下代码解决layer中select引发的滚动条问题，有需要时打开注释 */
  .layui-layer-page .layui-layer-content { overflow: visible !important; }
/*   .layui-table-cell {
    font-size:14px;
    padding:0 5px;
    height:auto;
    overflow:visible;
    text-overflow:inherit;
    white-space:normal;
    word-break: break-all;
  } */
  </style>
</head>
<body style='overflow: scroll;overflow:hidden'>
<form class="layui-form layui-card-body" action="javascript:void(0);">
  <div class="layui-form-item">
  	<div class="layui-inline">
  	  <input class="layui-input" type="text" id="name" name="name" autocomplete="off" placeholder="任务信息" />
    </div>
  	<div class="layui-inline">
  	  <select id="userId" name="userId" lay-search="">
		  <option value="">请选择责任人</option>
		  <#list userEnableList as item>
		  <option value="${item.id}">${item.nick}</option>
		  </#list>
 	  </select>
    </div>
    <!-- <div class="layui-inline">
	  <select name="status" lay-verify="">
		<option value="">请选择任务状态</option>
		<#list statusEnums as item>
		<option value="${item.code}">${item.message}</option>
		</#list>
	  </select> 
    </div> -->
    <div class="layui-inline">
		<div id="status">
		</div>
    </div>
    <div class="layui-inline">
	  <div class="layui-input-inline">
		  <select id="projectId" name="projectId" lay-search="">
			<option value="">选择所属项目</option>
			<#list projectAllList as item>
			<option value="${item.id}">${item.name}</option>
			</#list>
		  </select>      
      </div>
    </div>

	<div class="layui-inline">
		<input class="layui-input" type="text" id="codeStartStrStart"
				name="codeStartStrStart" autocomplete="off"
				placeholder="筛选开始时间" readonly />
	</div>
	<div class="layui-inline">
		<input class="layui-input" type="text" id="codeEndStrEnd"
				name="codeEndStrEnd" autocomplete="off" placeholder="筛选截止时间"
				readonly />
	</div>

	<div class="layui-inline">
    	<div class="layui-btn-group">
    		<button class="layui-btn" lay-submit lay-filter="search-opt">查询</button>
    	</div>
    </div>
  </div>
  <table id="table" lay-size="sm" class="layui-hide" lay-filter="table"></table>
</form>
<#include "/include/layui-end.html">
<script type="text/html" id="toolbar">
  <div class="layui-btn-group">
	<@shiro.hasPermission name="task_add_opt">
    <button class="layui-btn layui-btn-sm" lay-event="addData-opt">
	  <i class="layui-icon">&#xe654;</i> 新增
	</button>
	</@shiro.hasPermission>
	<button class="layui-btn layui-btn-sm" lay-event="export-file-opt">
	  <i class="layui-icon">&#xe655;</i> 导出周报
	</button>
	<@shiro.hasPermission name="task_delete_opt">
	<button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="batch-del-opt">
	  <i class="layui-icon">&#xe640;</i> 批量删除
	</button>
	</@shiro.hasPermission>
  </div>
  <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="refresh-opt">
	<i class="layui-icon">&#xe669;</i> 刷新
  </button>
</script>
<script type="text/html" id="optbar">
  <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="view-opt">查看</a>
  <@shiro.hasPermission name="task_edit_opt">
  <a class="layui-btn layui-btn-xs" lay-event="edit-opt">编辑</a>
  </@shiro.hasPermission>
  <@shiro.hasPermission name="task_delete_opt">
  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del-opt">删除</a>
  </@shiro.hasPermission>
</script>
<script>
	layui.config({
		base: '/components/app/boss/task/'
	}).extend({
	    selectN: '../../../layuiadmin/layui/extend/selectN',
	    selectM: '../../../layuiadmin/layui/extend/selectM',
	  }).use(['table','laydate','layer','form','selectN','selectM','element','taskWeeklyPage'],function(){
		var taskWeeklyPage = layui.taskWeeklyPage;
		taskWeeklyPage.render();
	});
</script>
</body>
<!-- windows弹窗定义开始 -->
<div id="windows" style="display: none;">
	<form class="layui-form layui-fluid" id="win-form" lay-filter="win-form" action="javascript:;">
	<input type="hidden" id="id-win" name="id"/>
	    <div class="layui-form-item">
	        <div class="layui-inline">
	            <label class="layui-form-label">任务信息</label>
	            <div class="layui-input-inline">
	                <input class="layui-input" type="text" id="name-win" name="name" placeholder="任务信息" lay-verify="required" autocomplete="off" />
	            </div>
	        </div>
	        <div class="layui-inline">
	            <div class="layui-inline">
		            <label class="layui-form-label">责任人</label>
		            <div class="layui-input-inline">
					  <select id="coder-win" name="userId" lay-search="">
						<option value=""></option>
						<#list userEnableList as item>
						<option value="${item.id}">${item.nick}</option>
						</#list>
					  </select>      
		            </div>
		        </div>
	        </div>
	    </div>
	    <div class="layui-form-item">
	        <div class="layui-inline">
	            <label class="layui-form-label">开始时间</label>
	            <div class="layui-input-inline">
	                <input class="layui-input" type="text" id="codeStart-win" name="codeStart" placeholder="任务开始时间" readonly  autocomplete="off" />
	            </div>
	        </div>
	        <div class="layui-inline">
	            <label class="layui-form-label">结束时间</label>
	            <div class="layui-input-inline">
	                <input class="layui-input" type="text" id="codeEnd-win" name="codeEnd" placeholder="任务完成时间" readonly  autocomplete="off" />
	            </div>
	        </div>
	    </div>
	    <div class="layui-form-item">
	        <div class="layui-inline">
	            <label class="layui-form-label">状态</label>
	            <div class="layui-input-inline">
				  <select name="status" lay-verify="">
					<option value=""></option>
					<#list statusEnums as item>
					<option value="${item.code}">${item.message}</option>
					</#list>
				  </select>      
	            </div>
	        </div>
	        <div class="layui-inline">
	            <label class="layui-form-label">耗费工时</label>
	            <div class="layui-input-inline">
	                <input class="layui-input" type="text" id="timeCost-win" name="timeCost" placeholder="耗费工时(小时)"   autocomplete="off" />
	            </div>
	        </div>
	    </div>
	    <div class="layui-form-item">
	    	<div class="layui-inline">
	            <label class="layui-form-label">所属项目</label>
	            <div class="layui-input-inline">
				  <select name="projectId" lay-search="" lay-verify="required">
					<option value=""></option>
					<#list projectAllList as item>
					<option value="${item.id}">${item.name}</option>
					</#list>
				  </select>      
	            </div>
	        </div>
	        <div class="layui-inline">
	            <label class="layui-form-label">进度</label>
	            <div class="layui-input-inline">
	                <input class="layui-input" type="text" id="progress-win" name="progress" placeholder="进度%"   autocomplete="off" />
	            </div>
	        </div>
	    </div>
	    <div class="layui-form-item">
            <label class="layui-form-label">挂起原因</label>
            <div class="layui-input-block">
                <textarea class="layui-textarea" id="pendingReson-win" name="pendingReson" placeholder="挂起原因"  autocomplete="off"></textarea>
            </div>
	    </div>
	    <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea class="layui-textarea" id="remarkTask-win" name="remarkTask" placeholder="备注"  autocomplete="off"></textarea>
            </div>
	    </div>
		<input id="win-submit" lay-submit lay-filter="win-submit" hidden="true"/>
	</form>
</div>
<!-- windows弹窗定义结束 -->
</html>